1. Field of the Invention
This invention relates to a method and apparatus for reproducing encoded data compressed in accordance with the MPEG system. More particularly, it relates to a technique of reproduction in a reverse direction in the reproducing method and apparatus.
2. Description of the Related Art
As a compression system for a moving picture exploiting correlation along the time axis across plural frames, an MPEG system (Motion Picture Coding Experts Group System) is being used extensively. For example, the video which has adopted the MPEG system is standardized in ISO-13818-2.
In the MPEG system, intra-frame prediction-coded pictures, which are encoded pictures composed of the information closed in a picture itself, are periodically inserted to enable random accessing, so that there is provided a picture group structure having at least one intra-frame predictive coded picture. This picture group is termed a group-of-pictures (GOP).
An example of the GOP structure in the MPEG system is explained by referring to FIG. 1.
The MPEG system provides three picture types, namely an I-picture, P-picture and a B-picture. The I-picture is the intra-frame predictive-coded picture, while the P-picture is the inter-frame forward predictive-coded picture, obtained by having reference to a previously coded temporally previous frame. The B-picture is a bidirectionally predictive-coded picture obtained on prediction by having reference to temporally previous and temporally posterior pictures. In the MPEG system, at least one I-picture is contained in one GOP.
FIG. 1 shows an example of such GOP structure. FIG. 1A shows the GOP structure in which the respective pictures are arrayed in the sequence of the decoding processing (decoding order), while FIG. 1B shows the state in which the respective pictures are arrayed in the sequence of the original pictures (presentation order).
In the example of FIG. 1, each GOP is made up of 15 frames, namely a sole I-picture, four P-pictures and 10 B-pictures. In FIG. 1, suffix letters to the pictures I, P and B denote the presentation order of these pictures.
In the example of FIG. 1, a picture I2 is encoded by itself, while a picture P5 is inter-frame predictive-coded by having reference to the picture I2. The pictures B3, B4 are inter-frame predictive-coded by having reference to the pictures I2 and the picture P5. Therefore, while the picture I2 can be decoded by itself, decoding of the picture P5 needs data decoded from the picture I2, while decoding of the pictures B3 and B4 need data decoded from the picture I2 and the picture P5.
Since the B-picture, which is the bidirectionally predictive-coded picture, is provided in the MPEG system, the processing order of the encoding processing or the decoding processing differs from the order of the original pictures, as shown for example in FIGS. 1A and 1B. Thus, the original moving picture is resumed by re-arraying the respective pictures, decoded in the sequence shown for example in FIG. 1A, in a proper sequence shown in FIG. 1, and displaying the re-arrayed pictures. Therefore, in order to decode the encoded frames, there is required an operation of sequentially decoding the encoded frames in the correct order taking into account the correlation of the respective pictures I, P and B.
With the data encoded by the MPEG system, there is raised a problem that difficulties are met in reproducing the data in a direction reversed to the time axis direction at an elevated speed by way of performing the reverse direction reproduction. This problem is discussed hereinafter in detail.
If, in the example of FIG. 1, reverse direction reproduction is to be made beginning from the picture B12, the respective pictures need to be displayed in the order of B12, P11, B10, B9, P8, B7, B6, P5, B4, B3, I2, B1, B0, . . . .
However, since it is necessary in the MPEG system to effect decoding sequentially along the time axis direction, the pictures I2, P5, P8, P11 and P14 need to be decoded in this order, if e.g., the picture B12 is to be decoded. If, after the end of decoding of the picture B12, the picture P11 is to be decoded, the pictures I2, P5 and P8 need to be re-decoded.
If, with the progress in the display, it becomes necessary to decode the picture B1, the pictures I2, P5, P8, P11 and P14 of the directly previous GOP need to be decoded sequentially, because the last P-picture of the directly previous GOP is required for decoding the picture B1.
The processing of sequentially decoding the pictures as from the leading end of a GOP is performed every time the respective pictures are displayed during reverse direction reproduction. Thus, in order to assure a constant displaying interval of the respective pictures, it is necessary to control the speed with the maximum time required in the decoding process. This imposes limitations on the speed of the reverse direction reproduction to render it impossible to effect reverse direction reproduction at an elevated speed.
Also, in decoding encoded data of a picture to be reproduced, it is necessary to start the decoding as from the intra-frame predictive-coded picture lying forwardly of the encoded data of the picture to be reproduced. That is, in decoding the encoded data of the picture desired to be reproduced, it is necessary to sequentially decode the intra-frame predictive-coded picture up to the picture to be reproduced without outputting these pictures to outside. If decoding up to the picture to be decoded has come to a close, the decoded data of the picture to be reproduced is outputted. In effecting reverse direction reproduction, the above-described decoding from the intra-frame predictive-coded picture up to the picture to be reproduced is repeatedly performed each time a sole picture is reproduced.
That is, since it is necessary in the reverse direction reproduction to decode the intra-frame predictive-coded picture up to the picture be reproduced, in an iterative fashion, each time a sole picture is to be reproduced. Therefore, if, in reading out the encoded data recorded on the recording medium by way of performing the reverse direction reproduction, the reverse direction reproduction is to be carried out at an elevated speed, the encoded data needs to be read out iteratively from the recording medium at an elevated speed.
As the recording medium for recording picture data, a disc-shaped recording medium or a tape-shaped recording medium is frequently used. However, limitations are imposed on reading out the data from the recording medium at an elevated speed. Thus, it has been difficult to effect the reverse direction reproduction at an elevated speed because of the necessity of repeatedly reading out the encoded data.
This problem is not only limited to the reverse direction reproduction of the data encoded in accordance with the MPEG system, but also is common to the reverse direction reproduction of the data encoded and compressed by exploiting the correlation along the time axis across plural frames.
It is therefore an object of the present invention to provide a reproducing method and apparatus in which it is possible to realize high-speed reverse direction reproduction of the encoded data comprised of picture data compressed in accordance with e.g., the MPEG system.
The reproducing apparatus according to the present invention is configured for reproducing compressed encoded data by exploiting correlation of picture data along the time axis direction over plural frames. The reproducing apparatus includes decoding means for decoding the encoded data, a frame memory in which to store the picture data decoded by the decoding means, writing means operating so that, in reverse direction reproduction of the encoded data in a direction reversed from the time axis direction, the encoded data of the respective pictures are sequentially decoded, the decoded picture data are sequentially stored in the frame memory, and if there is no vacant frame memory, the frame memories are sequentially overwritten beginning from the frame memory which stores the picture data decoded first, and output means for reading picture data to be reproduced on completion of decoding thereof to output the picture data to be reproduced. The reproducing apparatus also includes control means for performing control so that, on outputting the picture data to be reproduced, the frame memory which has stored the data of the outputted picture is evacuated for writing therein the picture data now to be decoded.
With the reproducing apparatus according to the present invention, the processing of repeatedly decoding the same frame at the time of reverse direction reproduction can be eliminated. That is, with the reproducing apparatus of the present invention, reverse direction reproduction can be realized with a smaller number of times of the decoding operations.
In the reproducing method of the present invention, if the encoded data is to be reproduced in a direction reversed from the time axis direction, the encoded data of the respective pictures are sequentially decoded, and the decoded picture data are sequentially saved in the frame memory. If there is no vacant frame memory, the frame memories are sequentially overwritten beginning from the frame memory which has stored the picture data decoded first. On completion of encoding of the picture data to be reproduced, the frame memory which has stored the data of the outputted picture is evacuated for writing therein the picture data to be decoded next.
With the reproducing method according to the present invention, the processing of repeatedly decoding the same frame at the time of reverse direction reproduction can be eliminated. That is, with the reproducing method of the present invention, reverse direction reproduction can be realized with a smaller number of times of the decoding operations.
In one aspect, the present invention provides a reproducing apparatus including readout means for reading out encoded data from a recording medium, having the encoded data recorded thereon, the encoded data having been compressed by exploiting inter-frame correlation in terms of a picture group structure as a unit, memory means having a storage capacity not less than the volume of the encoded data of the picture group structure, the memory means holding the encoded data read out from the recording medium by the readout means, decoding means for decoding the encoded data read out from the memory means, and control means for performing control for holding the encoded data of the picture group structure containing a picture to be reproduced in the memory means, at the time of reproducing the encoded data recorded on the recording medium in the reverse direction, and for reading out the encoded data repeatedly from the memory means to send the read-out encoded data to the decoding means.
If, at the time of the reverse direction reproduction, the encoded data held by the memory means becomes unnecessary due to completion of decoding, it is preferred that the area of the memory means which held the encoded data now not needed is sequentially cleared and set as vacant area. If there is any vacant area in the memory means at the time of the reverse directional reproduction, it is preferred that the readout means reads out the encoded data which are now necessary and stores the necessary encoded data sequentially in the vacant area of the memory means.
For reverse direction reproduction with the above-described reproducing apparatus of the present invention, encoded data of the picture group structure containing a picture to be reproduced is read out by readout means and stored in the memory means. If the encoded data already read out by the readout means and held in the memory means is required for decoding for reverse direction reproduction, the encoded data held by the memory means are read out and decoded. This eliminates the necessity of repeatedly reproducing the same encoded data to enable reverse direction reproduction.
In another aspect, the present invention provides a method for reverse direction reproduction including the steps of reading out encoded data from a recording medium, having the encoded data recorded thereon, the encoded data having been compressed by exploiting inter-frame correlation in terms of a picture group structure as a unit, holding, in the memory means, the encoded data of at least one picture group structure containing a picture to be reproduced, repeatedly reading out from the memory means the encoded data required for decoding a picture to be decoded, and decoding the read-out encoded data.
If, at the time of the reverse direction reproduction, the encoded data held by the memory means becomes unnecessary due to completion of decoding, it is preferred that the area of the memory means which held the encoded data now not needed is sequentially evacuated and set as vacant area. If, at the time of the reverse direction reproduction, there is any vacant area in the memory means, it is preferred that the readout means reads out the encoded data needed next and stores the encoded data sequentially in the vacant area of the memory means.
For reverse direction reproduction with the above-described reproducing method of the present invention, encoded data of the picture group structure containing a picture to be reproduced is read out by readout means and stored in the memory means. If the encoded data already read out by the readout means and held in the memory means is required for decoding for reverse direction reproduction, the encoded data held by the memory means are read out and decoded. This eliminates the necessity of repeatedly reproducing the same encoded data to enable reverse direction reproduction.
According to the present invention, the encoded data, which is the compressed picture data obtained on MPEG system, can be reproduced in the reversed direction at a higher speed.
According to the present invention, the reverse direction reproduction can be expedited simply by increasing the number of the frame memories. That is, according to the present invention, the reverse direction reproduction can be expedited as the cost is suppressed to a minimum.
If the present invention is applied to a reproducing apparatus having an editing function for picture data, it is possible to improve the tractability at the time of editing, to reduce the time for editing significantly.